/*
 * Data.h
 *
 *  Created on: 13 mei 2013
 *      Author: Wietse
 */

#ifndef DATA_H_
#define DATA_H_

#include "Definitions.h"
#include "Position.h"

#include <string>
#include <time.h>
#include <iostream>
#include <fstream>
#include <sstream>

class Data
{
private:
	Component		sourceType;
	int				senderID;
	Position		position;
	struct tm		timestamp;
public:
	Data();
	Data(Component, int, Position, struct tm*);
	virtual ~Data();

	Component	getSourceType();
	int			getSenderID();
	Position*	getStart();
	tm*			getTimestamp();

	bool		isNewer(Data&);

	bool		isExpired(Position*);

	void		printData();
	void		printSourceType();
	void		outputData(std::ofstream&);

	std::string	getIdentifier();
	std::string intToString(int);

};

#endif /* DATA_H_ */
